# FILENAME contains the list of the files to compile
SOURCE_FILES=	Source/main \
				Source/clanlib \
				Source/vector \
				Source/path	\
				Source/timing	\
				Source/core	\
				Source/Character \
				Source/kinematic \
				Source/CL_Character	\
				Source/steering	\
				Source/flock	\
				Source/Gluon	\
				Source/Group	\
				Source/Graph	\
				Source/Astar	\
				Source/program 		\
				Source/cartography	\
				Source/commandParser 

					
				
# Source/main \
# Source/app \
# Source/kinematic_demo \
# Source/location \

# LIBS contains the list of the clanlib libraries to use
LIBS=clanCore clanDisplay clanApp clanSWRender clanGL1

# BIN_NAME is the final name of the binary
BIN_NAME = smart
# General Compilation Flags
OPENGL=#-lGLU -lGL -lglut
MYFLAGS=-O3 -Wall
DEBUGFLAGS=-Wfatal-errors -Wno-write-strings
# BOOST LIBRARY
BOOSTLIBS=-lboost_filesystem -lboost_program_options
BOOSTLIBDIR=
BOOSTINCLUDEDIR=


# Get Paths to clanlib libs
PACKAGES = $(patsubst %,%-2.3,$(LIBS))
CPPFLAGS = `pkg-config --cflags $(PACKAGES)`
LIBSPATH = `pkg-config --libs $(PACKAGES)`

#Get object names
OBJS=$(patsubst %, %.o, $(SOURCE_FILES))

#CXX is Compiler Name
CXX = g++



 
all: $(OBJS)
	@echo Custom makefile for clanlib
	$(CXX) $(MYFLAGS) $(OPENGL) -o $(BIN_NAME) -pthread $(BOOSTLIBPATH) $(BOOSTLIBS) $(OBJS) $(LIBSPATH)
 
clean:
	-rm -rf ./Source/*.o
	-rm -f $(BIN_NAME)
	
%.o : %.cpp
	$(CXX) $(CPPFLAGS) $(DEBUGFLAGS) $(BOOSTINCLUDEDIR) $(BOOSTFLAGS) -c $< -o $@

